<template>
	<view>
<!-- 		<nav-bar style="z-index: 100;">{{pageTitle}}</nav-bar>
 -->		<web-view class="webview" :webview-styles="webviewStyles" :src="url"></web-view>

	</view>
</template>

<script>
	var wv;//计划创建的webview
	export default {
		data() {
			return {
				webviewStyles: {
					progress: {
						color: 'red'
					}
				},
				url: '',
				fileToken: '',
				userId: 0,
				pptId: 0,
				courseId: 0,
				classId: 0,
				token: '',
				pageTitle: 'web标题'
			}
		},

		created() {

		},

		onLoad(option) {
			this.pageTitle = option.title;
			console.log("drawingShow pageTitle:" + this.pageTitle )
			this.url = "/hybrid/html/svgLoad.html?svgpath=" + option.url + "&svgtitle=" + this.pageTitle + "&BitNumber=" + option.BitNumber + "&GId=" + option.GId + "&Type=" + option.Type;
			
			uni.setNavigationBarTitle({
			    title: this.pageTitle
			});
		},

		onReady() {
			// #ifdef APP-PLUS
			//获取当前页面的webview对象
			var currentWebview = this.$mp.page.$getAppWebview() 
			setTimeout(function() {
				wv = currentWebview.children()[0]
				wv.setStyle({
					scalable: true
				})
			}, 1000); 
			//如果是页面初始化调用时，需要延时一下
			// #endif
		},

		methods: {

		}
	}
</script>

<style scoped lang="scss">

</style>
